/**
 * Created the 5:47:07 PM.
 */
package com.google.code.head2head.service;

import java.util.List;

import com.google.code.head2head.model.Entry;

/**
 * @author Eric Bellard - eric.bellard@gmail.com Copyright © 2007 Eric Bellard.
 *         All rights reserved.
 */
public interface EntryService {

	/**
	 * Get the entry with the following id Get lazyly an entry
	 * 
	 * @param id
	 * @return
	 */
	public Entry getEntry(Double id);

	/**
	 * Get eagerly an entry
	 * 
	 * @param id
	 * @return
	 */
	public Entry getEntryWithRelations(Double id);

	/**
	 * Get the entries which have the tags in parameters
	 * 
	 * @param tags
	 * @return
	 */
	public List<Entry> getEntriesWithTag(String... tags);

	/**
	 * Get the entries which have the tags in parameters
	 * 
	 * @param first
	 *            first index
	 * @param count
	 *            max number of element to return
	 * @param tags
	 * @return
	 */
	public List<Entry> findEntriesWithTag(int first, int count, String... tags);

	/**
	 * Get all entries
	 * @param first
	 *            first index
	 * @param count
	 *            max number of element to return
	 */
	public List<Entry> findAll(int first, int last);

	/**
	 * Get all entries
	 * @return
	 */
	public List<Entry> findAll();
	
	/**
	 * Persists a new entry
	 * @param entry the entry to persist
	 */
	public void create(Entry entry);

}
